package com.sann.cms;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
/*启动类加了@MapperScan，所有的Mapper接口上就不用加@Mapper 注解了*/
@MapperScan(basePackages = "com.sann.cms.mapper")
@ComponentScan(basePackages = {"com.sann"})
/*将本应用服务注册到nacos中*/
@EnableDiscoveryClient
/*识别@FeignClient注解定义的feign客户端（启用feign客户端-识别得了@FeignClient）*/
@EnableFeignClients
public class CmsApplication {
    public static void main(String[] args) {
        SpringApplication.run(CmsApplication.class, args);
    }
}
